<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.List" %>
<%@ page import="com.google.appengine.api.datastore.Entity" %>
<%@ page import="com.google.appengine.api.datastore.KeyFactory" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Recent rudenesses</title>
        <link rel="stylesheet" type="text/css" href="/static/styles.css" /> 
</head>
<body>
<div id="todoapp">
    <h1>Recent Rudenesses</h1>

    <div class="navigation">
        <a href="/">Home</a> | 
        <a href="/recent">Recent</a>
    </div>

	
	<div id="rudenesses">
	    <ul id="todo-list">
	        <% 
	        List<Entity> uses = (List<Entity>) request.getAttribute("uses");
	        for(Entity use : uses) {
	        %>
	
	        <li>
	            <span class="used-rudeness-body">
	            <%= use.getProperty("rudenessBody") %>
	            </span>
                <div class="uses-info">	            
	            Used: <%= use.getProperty("timestamp") %>
	            </div>
	        </li>
	        <% } %>
	    </ul>
	</div>

</div>
</body>
</html>